//生成唯一id方法
package cryptos

import (
	"crypto/md5"
	"encoding/base64"
	"encoding/hex"
)

//获取MD5值
func GetMd5String(s string) string {
	h := md5.New()
	h.Write([]byte(s))
	return hex.EncodeToString(h.Sum(nil))
}

//获取guid
func GetGuid(params []byte) string {
	return GetMd5String(base64.URLEncoding.EncodeToString(params))
}

